#include<bits/stdc++.h>
using namespace std;
int lnum;
string str;

int main() {
    freopen("./02.in", "r", stdin);
    cin >> str;
    for (auto ch : str) {
        if (ch == '(') {
            lnum++;
        } else {
            if (lnum) {
                lnum--;
            } else {
                cout << "no\n";
                return 0;
            }
        }
    }
    if (lnum == 0) cout << "yes\n";
    else cout << "no\n";
    return 0;
}